package store.lunangangster.engine.impl.entity.mgr;

import store.lunangangster.engine.ProcessEngineConfiguration;
import store.lunangangster.engine.impl.entity.HistoryEntity;
import store.lunangangster.engine.impl.entity.HistoryEntityImpl;

public class HistoryEntityManagerImpl extends AbstractEntityManagerImpl<HistoryEntity> implements HistoryEntityManager {

  public HistoryEntityManagerImpl(
      ProcessEngineConfiguration processEngineConfiguration) {
    super(processEngineConfiguration);
  }


  @Override
  public void deleteHistoriesByProcessInstanceId(String processInstanceId) {
    getDbSqlSession().getSqlSession().delete("deleteHistoriesByProcessInstanceId", processInstanceId);
  }

  @Override
  public Class<? extends HistoryEntity> getManagedEntityClass() {
    return HistoryEntityImpl.class;
  }

  @Override
  public HistoryEntity create() {
    return new HistoryEntityImpl();
  }

}
